package org.pray.reversedep;

public record RecordTest(int age, String name) {
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        RecordTest that = (RecordTest) o;

        if (age != that.age) {
            return false;
        }
        return name.equals(that.name);
    }

    @Override
    public int hashCode() {
        int result = age;
        result = 31 * result + name.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "RecordTest{" +
                "age=" + age +
                ", name='" + name + '\'' +
                '}';
    }
}
